
//
//  GoodStoysCollectionViewCell.m
//  NBTripe
//
//  Created by Lee on 16/1/8.
//  Copyright © 2016年 Vicki. All rights reserved.
//

#import "GoodStoysCollectionViewCell.h"

@interface GoodStoysCollectionViewCell ()
@property (strong, nonatomic) IBOutlet UIImageView *images;
@property (strong, nonatomic) IBOutlet UILabel *titleLabel;
@property (strong, nonatomic) IBOutlet UIImageView *headImageView;
@property (strong, nonatomic) IBOutlet UILabel *nameLabel;

@end
@implementation GoodStoysCollectionViewCell





- (void)setModel:(RecommendSecondModel *)model {
    if(_model != model) {
        _model = model;
    }
    [_images sd_setImageWithURL:[NSURL URLWithString:_model.index_cover]placeholderImage:[UIImage imageNamed:@"160.jpg"]];
    _titleLabel.text = model.index_title;
 

}
- (void)setUsermodel:(UserModel *)usermodel {
    if (_usermodel != usermodel) {
        _usermodel = usermodel;
    }
    [_headImageView sd_setImageWithURL:[NSURL URLWithString:_usermodel.avatar_m]placeholderImage:[UIImage imageNamed:@"160.jpg"]];
    _nameLabel.text = _usermodel.name;
}
- (void)layoutSubviews {
    [super layoutSubviews];
    self.headImageView.layer.masksToBounds = YES;
    self.headImageView.layer.cornerRadius = self.headImageView.width/2;
    self.images.layer.masksToBounds = YES;
    self.images.layer.cornerRadius = 5;
}

- (void)awakeFromNib {
    // Initialization code
    
}

@end
